package com.zhonghui.common.eshopDomain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;

@TableName("store_pink")
public class StorePink extends BaseDomain {
    @TableId
    @ApiModelProperty("拼团产品ID")
    private Long id;
    @ApiModelProperty("拼团产品用户ID")
    private Long uid;
    @ApiModelProperty("拼团产品订单ID 生成")
    private String orderId;
    @ApiModelProperty("拼团产品订单id  数据库")
    private Long orderIdKey;
    @ApiModelProperty("购买商品个数")
    private Integer totalNum;
    @ApiModelProperty("购买总金额")
    private BigDecimal totalPrice;
    @ApiModelProperty("拼团产品id")
    private Long cid;
    @ApiModelProperty("产品id")
    private Long pid;
    @ApiModelProperty("拼团总人数")
    private Integer people;
    @ApiModelProperty("拼团产品单价")
    private BigDecimal price;
    @ApiModelProperty("拼团产品停止时间")
    private Date stopTime;
    @ApiModelProperty("拼团产品团长id 0为团长")
    private Long kId;
    @ApiModelProperty("是否发送模板消息0未发送1已发送")
    private Integer isTpl;
    @ApiModelProperty("是否退款 0未退款 1已退款")
    private Integer isRefund;
    @ApiModelProperty("状态1进行中2已完成3未完成")
    private Integer status;
    @ApiModelProperty("库存唯一值")
    private String uniqueId;

    public void copy(StorePink source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }

    public static StorePink.StorePinkBuilder builder() {
        return new StorePink.StorePinkBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public Long getUid() {
        return this.uid;
    }

    public String getOrderId() {
        return this.orderId;
    }

    public Long getOrderIdKey() {
        return this.orderIdKey;
    }

    public Integer getTotalNum() {
        return this.totalNum;
    }

    public BigDecimal getTotalPrice() {
        return this.totalPrice;
    }

    public Long getCid() {
        return this.cid;
    }

    public Long getPid() {
        return this.pid;
    }

    public Integer getPeople() {
        return this.people;
    }

    public BigDecimal getPrice() {
        return this.price;
    }

    public Date getStopTime() {
        return this.stopTime;
    }

    public Long getKId() {
        return this.kId;
    }

    public Integer getIsTpl() {
        return this.isTpl;
    }

    public Integer getIsRefund() {
        return this.isRefund;
    }

    public Integer getStatus() {
        return this.status;
    }

    public String getUniqueId() {
        return this.uniqueId;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setUid(final Long uid) {
        this.uid = uid;
    }

    public void setOrderId(final String orderId) {
        this.orderId = orderId;
    }

    public void setOrderIdKey(final Long orderIdKey) {
        this.orderIdKey = orderIdKey;
    }

    public void setTotalNum(final Integer totalNum) {
        this.totalNum = totalNum;
    }

    public void setTotalPrice(final BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public void setCid(final Long cid) {
        this.cid = cid;
    }

    public void setPid(final Long pid) {
        this.pid = pid;
    }

    public void setPeople(final Integer people) {
        this.people = people;
    }

    public void setPrice(final BigDecimal price) {
        this.price = price;
    }

    public void setStopTime(final Date stopTime) {
        this.stopTime = stopTime;
    }

    public void setKId(final Long kId) {
        this.kId = kId;
    }

    public void setIsTpl(final Integer isTpl) {
        this.isTpl = isTpl;
    }

    public void setIsRefund(final Integer isRefund) {
        this.isRefund = isRefund;
    }

    public void setStatus(final Integer status) {
        this.status = status;
    }

    public void setUniqueId(final String uniqueId) {
        this.uniqueId = uniqueId;
    }

    public String toString() {
        return "StorePink(id=" + this.getId() + ", uid=" + this.getUid() + ", orderId=" + this.getOrderId() + ", orderIdKey=" + this.getOrderIdKey() + ", totalNum=" + this.getTotalNum() + ", totalPrice=" + this.getTotalPrice() + ", cid=" + this.getCid() + ", pid=" + this.getPid() + ", people=" + this.getPeople() + ", price=" + this.getPrice() + ", stopTime=" + this.getStopTime() + ", kId=" + this.getKId() + ", isTpl=" + this.getIsTpl() + ", isRefund=" + this.getIsRefund() + ", status=" + this.getStatus() + ", uniqueId=" + this.getUniqueId() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof StorePink)) {
            return false;
        } else {
            StorePink other = (StorePink)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                label205: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label205;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label205;
                    }

                    return false;
                }

                label198: {
                    Object this$uid = this.getUid();
                    Object other$uid = other.getUid();
                    if (this$uid == null) {
                        if (other$uid == null) {
                            break label198;
                        }
                    } else if (this$uid.equals(other$uid)) {
                        break label198;
                    }

                    return false;
                }

                Object this$orderIdKey = this.getOrderIdKey();
                Object other$orderIdKey = other.getOrderIdKey();
                if (this$orderIdKey == null) {
                    if (other$orderIdKey != null) {
                        return false;
                    }
                } else if (!this$orderIdKey.equals(other$orderIdKey)) {
                    return false;
                }

                label184: {
                    Object this$totalNum = this.getTotalNum();
                    Object other$totalNum = other.getTotalNum();
                    if (this$totalNum == null) {
                        if (other$totalNum == null) {
                            break label184;
                        }
                    } else if (this$totalNum.equals(other$totalNum)) {
                        break label184;
                    }

                    return false;
                }

                Object this$cid = this.getCid();
                Object other$cid = other.getCid();
                if (this$cid == null) {
                    if (other$cid != null) {
                        return false;
                    }
                } else if (!this$cid.equals(other$cid)) {
                    return false;
                }

                label170: {
                    Object this$pid = this.getPid();
                    Object other$pid = other.getPid();
                    if (this$pid == null) {
                        if (other$pid == null) {
                            break label170;
                        }
                    } else if (this$pid.equals(other$pid)) {
                        break label170;
                    }

                    return false;
                }

                Object this$people = this.getPeople();
                Object other$people = other.getPeople();
                if (this$people == null) {
                    if (other$people != null) {
                        return false;
                    }
                } else if (!this$people.equals(other$people)) {
                    return false;
                }

                Object this$kId = this.getKId();
                Object other$kId = other.getKId();
                if (this$kId == null) {
                    if (other$kId != null) {
                        return false;
                    }
                } else if (!this$kId.equals(other$kId)) {
                    return false;
                }

                Object this$isTpl = this.getIsTpl();
                Object other$isTpl = other.getIsTpl();
                if (this$isTpl == null) {
                    if (other$isTpl != null) {
                        return false;
                    }
                } else if (!this$isTpl.equals(other$isTpl)) {
                    return false;
                }

                label142: {
                    Object this$isRefund = this.getIsRefund();
                    Object other$isRefund = other.getIsRefund();
                    if (this$isRefund == null) {
                        if (other$isRefund == null) {
                            break label142;
                        }
                    } else if (this$isRefund.equals(other$isRefund)) {
                        break label142;
                    }

                    return false;
                }

                label135: {
                    Object this$status = this.getStatus();
                    Object other$status = other.getStatus();
                    if (this$status == null) {
                        if (other$status == null) {
                            break label135;
                        }
                    } else if (this$status.equals(other$status)) {
                        break label135;
                    }

                    return false;
                }

                Object this$orderId = this.getOrderId();
                Object other$orderId = other.getOrderId();
                if (this$orderId == null) {
                    if (other$orderId != null) {
                        return false;
                    }
                } else if (!this$orderId.equals(other$orderId)) {
                    return false;
                }

                label121: {
                    Object this$totalPrice = this.getTotalPrice();
                    Object other$totalPrice = other.getTotalPrice();
                    if (this$totalPrice == null) {
                        if (other$totalPrice == null) {
                            break label121;
                        }
                    } else if (this$totalPrice.equals(other$totalPrice)) {
                        break label121;
                    }

                    return false;
                }

                label114: {
                    Object this$price = this.getPrice();
                    Object other$price = other.getPrice();
                    if (this$price == null) {
                        if (other$price == null) {
                            break label114;
                        }
                    } else if (this$price.equals(other$price)) {
                        break label114;
                    }

                    return false;
                }

                Object this$stopTime = this.getStopTime();
                Object other$stopTime = other.getStopTime();
                if (this$stopTime == null) {
                    if (other$stopTime != null) {
                        return false;
                    }
                } else if (!this$stopTime.equals(other$stopTime)) {
                    return false;
                }

                Object this$uniqueId = this.getUniqueId();
                Object other$uniqueId = other.getUniqueId();
                if (this$uniqueId == null) {
                    if (other$uniqueId != null) {
                        return false;
                    }
                } else if (!this$uniqueId.equals(other$uniqueId)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof StorePink;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = super.hashCode();
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $uid = this.getUid();
        result = result * 59 + ($uid == null ? 43 : $uid.hashCode());
        Object $orderIdKey = this.getOrderIdKey();
        result = result * 59 + ($orderIdKey == null ? 43 : $orderIdKey.hashCode());
        Object $totalNum = this.getTotalNum();
        result = result * 59 + ($totalNum == null ? 43 : $totalNum.hashCode());
        Object $cid = this.getCid();
        result = result * 59 + ($cid == null ? 43 : $cid.hashCode());
        Object $pid = this.getPid();
        result = result * 59 + ($pid == null ? 43 : $pid.hashCode());
        Object $people = this.getPeople();
        result = result * 59 + ($people == null ? 43 : $people.hashCode());
        Object $kId = this.getKId();
        result = result * 59 + ($kId == null ? 43 : $kId.hashCode());
        Object $isTpl = this.getIsTpl();
        result = result * 59 + ($isTpl == null ? 43 : $isTpl.hashCode());
        Object $isRefund = this.getIsRefund();
        result = result * 59 + ($isRefund == null ? 43 : $isRefund.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $orderId = this.getOrderId();
        result = result * 59 + ($orderId == null ? 43 : $orderId.hashCode());
        Object $totalPrice = this.getTotalPrice();
        result = result * 59 + ($totalPrice == null ? 43 : $totalPrice.hashCode());
        Object $price = this.getPrice();
        result = result * 59 + ($price == null ? 43 : $price.hashCode());
        Object $stopTime = this.getStopTime();
        result = result * 59 + ($stopTime == null ? 43 : $stopTime.hashCode());
        Object $uniqueId = this.getUniqueId();
        result = result * 59 + ($uniqueId == null ? 43 : $uniqueId.hashCode());
        return result;
    }

    public StorePink(final Long id, final Long uid, final String orderId, final Long orderIdKey, final Integer totalNum, final BigDecimal totalPrice, final Long cid, final Long pid, final Integer people, final BigDecimal price, final Date stopTime, final Long kId, final Integer isTpl, final Integer isRefund, final Integer status, final String uniqueId) {
        this.id = id;
        this.uid = uid;
        this.orderId = orderId;
        this.orderIdKey = orderIdKey;
        this.totalNum = totalNum;
        this.totalPrice = totalPrice;
        this.cid = cid;
        this.pid = pid;
        this.people = people;
        this.price = price;
        this.stopTime = stopTime;
        this.kId = kId;
        this.isTpl = isTpl;
        this.isRefund = isRefund;
        this.status = status;
        this.uniqueId = uniqueId;
    }

    public StorePink() {
    }

    public static class StorePinkBuilder {
        private Long id;
        private Long uid;
        private String orderId;
        private Long orderIdKey;
        private Integer totalNum;
        private BigDecimal totalPrice;
        private Long cid;
        private Long pid;
        private Integer people;
        private BigDecimal price;
        private Date stopTime;
        private Long kId;
        private Integer isTpl;
        private Integer isRefund;
        private Integer status;
        private String uniqueId;

        StorePinkBuilder() {
        }

        public StorePink.StorePinkBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public StorePink.StorePinkBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }

        public StorePink.StorePinkBuilder orderId(final String orderId) {
            this.orderId = orderId;
            return this;
        }

        public StorePink.StorePinkBuilder orderIdKey(final Long orderIdKey) {
            this.orderIdKey = orderIdKey;
            return this;
        }

        public StorePink.StorePinkBuilder totalNum(final Integer totalNum) {
            this.totalNum = totalNum;
            return this;
        }

        public StorePink.StorePinkBuilder totalPrice(final BigDecimal totalPrice) {
            this.totalPrice = totalPrice;
            return this;
        }

        public StorePink.StorePinkBuilder cid(final Long cid) {
            this.cid = cid;
            return this;
        }

        public StorePink.StorePinkBuilder pid(final Long pid) {
            this.pid = pid;
            return this;
        }

        public StorePink.StorePinkBuilder people(final Integer people) {
            this.people = people;
            return this;
        }

        public StorePink.StorePinkBuilder price(final BigDecimal price) {
            this.price = price;
            return this;
        }

        public StorePink.StorePinkBuilder stopTime(final Date stopTime) {
            this.stopTime = stopTime;
            return this;
        }

        public StorePink.StorePinkBuilder kId(final Long kId) {
            this.kId = kId;
            return this;
        }

        public StorePink.StorePinkBuilder isTpl(final Integer isTpl) {
            this.isTpl = isTpl;
            return this;
        }

        public StorePink.StorePinkBuilder isRefund(final Integer isRefund) {
            this.isRefund = isRefund;
            return this;
        }

        public StorePink.StorePinkBuilder status(final Integer status) {
            this.status = status;
            return this;
        }

        public StorePink.StorePinkBuilder uniqueId(final String uniqueId) {
            this.uniqueId = uniqueId;
            return this;
        }

        public StorePink build() {
            return new StorePink(this.id, this.uid, this.orderId, this.orderIdKey, this.totalNum, this.totalPrice, this.cid, this.pid, this.people, this.price, this.stopTime, this.kId, this.isTpl, this.isRefund, this.status, this.uniqueId);
        }

        public String toString() {
            return "StorePink.StorePinkBuilder(id=" + this.id + ", uid=" + this.uid + ", orderId=" + this.orderId + ", orderIdKey=" + this.orderIdKey + ", totalNum=" + this.totalNum + ", totalPrice=" + this.totalPrice + ", cid=" + this.cid + ", pid=" + this.pid + ", people=" + this.people + ", price=" + this.price + ", stopTime=" + this.stopTime + ", kId=" + this.kId + ", isTpl=" + this.isTpl + ", isRefund=" + this.isRefund + ", status=" + this.status + ", uniqueId=" + this.uniqueId + ")";
        }
    }
}
